Ctrl = function(key, callback, args) {
    var isCtrl = false;
    $(document).keydown(function(e) {
        if(!args) args=[]; // IE barks when args is null
		
		if ( key == 'Enter' )
			keyCode = 13;
		else
			keyCode = key.charCodeAt(0);

        if(e.ctrlKey) isCtrl = true;
        if(e.keyCode == keyCode && isCtrl) {
            callback.apply(this, args);
            return false;
        }

		return true;
    }).keyup(function(e) {
        if(e.ctrlKey) isCtrl = false;
		return true;
    });
};

Alt = function(key, callback, args) {
    var isAlt = false;
    $(document).keydown(function(e) {
        if(!args) args=[]; // IE barks when args is null

        if(e.altKey) isAlt = true;
        if(e.keyCode == key.charCodeAt(0) && isAlt) {
            callback.apply(this, args);
            return false;
        }

		return true;
    }).keyup(function(e) {
        if(e.AltKey) isAlt = false;
		return true;
    });
};

Key = function(key, callback) {
    $(document).keydown(function(e) {
		var code = key.charCodeAt(0);
		if ( key == 'Esc' ) code = 27;
		if ( key == 'Add' ) code = 107;

        if( e.keyCode == code ) {
            callback();
            return false;
        }
    });
};